{template 'header.html','webapp'}
	

{if $contentid}
	
    <div data-role="content"> 
		<h1 class='title'>{$title}</h1>
    
		<p style='color:#666;font-size:x-small;'> <a href="">{nickname($userid)}</a> 发布于 {date('Y-m-d',$inputtime)}</p>
		<div class='TextContent'>{$content}</div>
    </div> 
    
    <div data-role="content">
    
    
    <ul data-role="listview" data-inset="true">
            <li data-role="list-divider">相关资讯(5)</li>
            {get sql="select * from table_content where `catid` = $catid and status = 99 order by listorder desc,hits desc" rows="5"}
            <li><a href="{url("?module=$module&file=$file&contentid=$r[contentid]")}">{$r[title]}</a></li>		
            {/get}
      </ul>
    </div>
    
    <div data-role="content">
        <form id="form_comment" action="/action/news/comment?news=34557" method="post">
            <input type="hidden" name="client_type" value="2"/>
            <input type='hidden' name='user' value='119067'/>
            <input type='hidden' name='goto_page' value='/news/comment_ok?news=34557'/>
            <input type='hidden' name='error_page' value='/news/comment_ok'/>
            <textarea name="content" placeholder="请输入评论内容..." style='display:block;'></textarea>
                    <input type="submit" data-theme="b" data-inline="true" value='我要评论' id="btn_comment"/>
        </form>
     </div>

{else}

    <div data-role="content">
    <ul data-role="listview" data-inset="true">
        <li data-role="list-divider">最新新闻</li>
        
        {get sql="select * from table_content where status = 99 order by updatetime desc,hits desc" rows="10"}
        <li>
            <a class="ui-link-inherit" href="{url("?module=$module&file=content&contentid=$r[contentid]")}">                    
                <h3 class="ui-li-heading">{str_cut($r[title], 60)}</h3>
                <p class="ui-li-desc">{str_cut($r[description], 60)}</p>
            </a>
        </li>
        {/get}
    </ul>
    <div>
        <a href="?p=2" data-role="button" data-inline="true" data-icon="arrow-r" data-iconpos="right">下一页</a>		&nbsp;页次 1/8</div>
    </div>
		
     {/if}   
        
  {template 'footer.html','webapp'}